I'm working with this library that allows applying such an event to a hotspot, and I can't figure out how to use it on a simple text link instead. Hoping this is a simple question, do you know how to solve this?
The documentation does solely apply this function to hotspots like this:
"events":{
"onClick": ["action-loadscene-2", "action-camera-0"]
}
Can I either apply this in HTML or the js file to a link? My humble failed try looks like this (not sure yet if I'll need to apply a camera as well):
<a onclick:action-loadscene-2>Go to the next scene</a>
Documentation: https://releases.forgejs.org/latest/doc/json/#hotspot/hotspot-events
Sample applying the onclick event to a hotspot: https://forgejs.org/samples/hotspots-with-actions
Corresponding Codepen: https://codepen.io/forgejs/pen/XpbJrX
Where I'm trying to get this to work: http://www.michaelkueng.ch/360/test/